package net.shopxx.entity;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "bmw_task_gift")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "bmw_task_gift_sequence")
public class TaskGift extends BaseEntity{
	
	private static final long serialVersionUID = 433370016083897027L;
	
	/** 礼品标题 */
	private String title;
	
	/** 礼品图片 */
	private String img;
	
	/** 任务 */
	private List<Task> tasks;

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}
	
	@ManyToMany(mappedBy = "gifts", fetch = FetchType.LAZY)
	public List<Task> getTasks() {
		return tasks;
	}

	public void setTasks(List<Task> tasks) {
		this.tasks = tasks;
	}

}
